package com.roncoo.education.oauth.handler;

import java.util.HashMap;
import java.util.Map;

import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExceptionHandler {
    //拦截Exception异常
    @org.springframework.web.bind.annotation.ExceptionHandler(value = Exception.class)
    public Map<String, Object> baseException(Exception e){
    	Map<String, Object> ret = new HashMap<String, Object>();
    	
		ret.put("code", 500);
		ret.put("msg", e.getMessage());
		return ret;
    }
}
